<?php

namespace App\IndexConfigurators;

use ScoutElastic\IndexConfigurator;
use ScoutElastic\Migratable;

class UserIndexConfigurator extends IndexConfigurator
{
    use Migratable;

    protected $name = 'huanbao_users';

    /**
     * @var array
     */
    protected $settings = [
        //
    ];

    protected $defaultMapping = [
        'properties' =>
            array (
                'avatar' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
                'comment_count' =>
                    array (
                        'type' => 'long',
                    ),
                'created_at' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
                'email' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
                'fans_counts' =>
                    array (
                        'type' => 'long',
                    ),
                'following_counts' =>
                    array (
                        'type' => 'long',
                    ),
                'id' =>
                    array (
                        'type' => 'long',
                    ),
                'key' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
                'name' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'raw' =>
                                    array (
                                        'type' => 'keyword',
                                    ),
                            ),
                    ),
                'register_source' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
                'score_count' =>
                    array (
                        'type' => 'long',
                    ),
                'topic_count' =>
                    array (
                        'type' => 'long',
                    ),
                'updated_at' =>
                    array (
                        'type' => 'text',
                        'fields' =>
                            array (
                                'keyword' =>
                                    array (
                                        'type' => 'keyword',
                                        'ignore_above' => 256,
                                    ),
                            ),
                    ),
            ),
    ];
}